#!/bin/bash

help() {
  echo "Usage:"
  echo "  zmicro config delete <key>"
}

core() {
  if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    help
    exit 0
  fi

  local key=$1
  if [ "$key" = "" ]; then
    log::error "key is required"
    log::error ""
    
    help
    exit 1
  fi

  config::remove $key
}

run() {
  core $@
}

run $@
